<?php
// $Id: PageView.php 27 2010-11-16 12:49:54Z mjohnson60@gmail.com $


Loader::import('Html');

/**
 * Enter description here ...
 * 
 * @author Mark Phillip Johnson
 * @version 1.0
 * @copyright Copyright (c) 2010, markjohnson
 * @license http://www.gnu.org/licenses/gpl.html The GNU General Public License v3.0
 *
 */
class PageView extends View
{
	var $headTitle = '';
	var $head = '';
	var $styles = '';
	var $scripts = '';
	
	var $logo = '';
	var $menu = '';
	var $breadcrumbs = '';
	var $title = '';
	
	var $tabs = '';
	var $messages = '';
	
	var $content = '';
	
	var $footer = '';
	
	var $doctype = Html::DOCTYPE_XHTML11;

	/**
	 * Enter description here ...
	 * 
	 */
	public function __construct()
	{
		parent::__construct();
		
		$this->model = 'page';
	}

	public function draw(string $content)
	{
		$output = Html::doctype($this->doctype);
		$output .= '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">';
		$output .= $this->htmlHead();
		$output .= $this->body($content);
		$output .= '</html>';
		
		return $output;
	}

	/**
	 * Enter description here ...
	 * 
	 * @return string
	 */
	public function headTitle()
	{
		return '<title>' . $this->headTitle . '</title>';
	}

	/**
	 * Enter description here ...
	 * 
	 * @return string
	 */
	public function htmlHead()
	{
		return '<head>' . $this->head . "\n" . $this->htmlTitle() . "\n" . $this->styles . "\n" . $this->scripts . '</head>';
	}

	public function body(string $content)
	{
	
	}
}
